-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new lint: string-slice #7878
new lint: string-slice #7878
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, thanks!
I made a small comment.
clippy_lints/src/strings.rs
Outdated
/// | ||
/// ### Known problems | ||
/// Probably lots of false positives. If an index comes from a known valid position (e.g. | ||
/// obtained via `char_indices` over the same string), it is totally OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
/// obtained via `char_indices` over the same string), it is totally OK. | |
/// obtained via `char_indices` over the same string), it is totally OK. |
@bors r+ Thanks! |
📌 Commit 999b300 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This is a restriction lint to highlight code that should have tests containing non-ascii characters. See #6623.
changelog: new lint: [
string-slice
]